package edu.neu.cloud_factory;

//import com.example.testMyBatisPlus.entity.po.User;
//import com.example.testMyBatisPlus.cloud_factory.mapper.UserMapper;
import edu.neu.cloud_factory.dao.UserMapper;
import edu.neu.cloud_factory.entity.po.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class Runner implements ApplicationRunner {
//    @Autowired
//    UserPoMapper userMapper;
//
    @Autowired
    UserMapper userMapper;
//
//    @Override
    public void run(ApplicationArguments args) throws Exception {
//        log.info("test");
////        List<UserPo> tUserList = userMapper.selectList(null);
////        System.out.println(tUserList.size());
////        tUserList.forEach(tUser -> {
////            System.out.println(tUser.getuId());
////        });
//
        log.info("test plus");
//        List<String> strings = userMapper.test();
//        strings.forEach(s -> {
//            System.out.println(s);
//        });
        List<User> userList = userMapper.selectList(null);
        userList.forEach(user -> {
            System.out.println(user.getUId());
        });
//
//
    }
}
